package com.zzw.hj3;

import java.util.Scanner;
import java.util.Arrays;

/**
 * @Project: hw_java
 * @Description: 明明的随机数
 * @Author: zzw
 */

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    // 数组去重
    public static int[] uniqueNum(int[] num) {
        int[] newArr = new int[num.length];
        int index = 0;
        // 遍历全队成员，将当前项与左边逐个进行对比，如果值相同且下标相同表示唯一，否则是重复项，忽略
        for (int i = 0; i < num.length; i++) {
            for (int j = 0; j <= i; j++) {
                if (num[i] == num[j]) {
                    if (i == j) {
                        newArr[index] = num[i];
                        index++;
                    }
                    break;
                }
            }
        }
        return Arrays.copyOf(newArr, index);
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] num = new int[n];
        for (int i = 0; i < num.length; i++) {
            num[i] = in.nextInt();
        }
        int[] result = uniqueNum(num);
        Arrays.sort(result);
        for (int r : result) {
            System.out.println(r);
        }
    }
}
